package com.simtop.service.impl;

import com.simtop.dao.ExperimentMapper;
import com.simtop.pojo.experiment.ExperimentVo;
import com.simtop.pojo.experiment.ExperimentVoThree;
import com.simtop.pojo.experiment.ExperimentVoTwo;
import com.simtop.service.ExperimentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lvyongwei
 */
@Service
public class ExperimentServiceImpl implements ExperimentService {

    @Autowired
    private ExperimentMapper experimentMapper;

    /**
     * 添加
     * @param experimentVoThree
     * @return
     */
    @Override
    public boolean insert(ExperimentVoThree experimentVoThree) {
        return experimentMapper.insert(experimentVoThree);
    }

    /**
     * 删除
     * @param ids
     * @return
     */
    @Override
    public boolean delete(Long[] ids) {
        return experimentMapper.delete(ids);
    }

    /**
     * 查询列表
     * @param experimentVo
     * @return
     */
    @Override
    public List<ExperimentVo> getAll(ExperimentVoThree experimentVo) {
        return experimentMapper.getAll(experimentVo);
    }

    /**
     * 查询详情
     * @param id
     * @return
     */
    @Override
    public ExperimentVoThree getContent(Long id) {
        return experimentMapper.getContent(id);
    }
}
